﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Demo1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }


        public delegate void clickDelegate(int clickindex);
        static public event clickDelegate _clickEvent;


        //List<Player> PlayerList = new List<Player>();
        Player _Player = new Player(1);


        Random Rand = new Random(1);

        private void Form1_Load(object sender, EventArgs e)
        {
            this.timer1.Start();


            //PlayerList.Add(_Player);

        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            _Player.Update();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            _Player.AddProcess(new Quest1(_Player), 0);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            if (_clickEvent != null)
                _clickEvent(1);
        }

        private void button4_Click(object sender, EventArgs e)
        {
            if (_clickEvent != null)
                _clickEvent(2);

        }

        private void button2_Click(object sender, EventArgs e)
        {
            _Player.AddProcess(new Quest2(_Player), 0);
        }
    }
}